<template>
 <div class="good-list">
    <!-- 循环goods中的数据将item以good-item传递给gooditem -->
    <good-list-item v-for="(item,index) in goods" :goods-item="item" :key=index />
 </div>
</template>

<script>
import GoodListItem from './GoodListItem'
 export default {
   name:'GoodList',
   props:{
       goods:Array
   },
   components:{
       GoodListItem
   }
 }
</script>

 
<style scoped>
 .good-list{
   display: flex;
   flex-wrap: wrap;
   justify-content: space-around;
   padding:2px;
 }
 
</style>
